package es.cazadoresmadridejos.beans.manager.city.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import es.cazadoresmadridejos.beans.dao.city.CityDao;
import es.cazadoresmadridejos.beans.manager.city.CityManager;
import es.cazadoresmadridejos.common.bean.dao.Dao;
import es.cazadoresmadridejos.common.bean.manager.impl.ManagerImpl;
import es.cazadoresmadridejos.model.City;

@Service
public class CityManagerImpl extends ManagerImpl<City> 
	implements CityManager{

	@Autowired 
	public void setDao(@Qualifier("cityDao")
	Dao<City> dao) {
		this.dao = dao;
	}

	@Override
	public List<City> findByProvince(Long id) {
		return ((CityDao)dao).findByProvince(id);
	}

}
